//package com.example.hellodocker.service;
//
//import com.example.hellodocker.model.SysUser;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.security.core.GrantedAuthority;
//import org.springframework.security.core.authority.AuthorityUtils;
//import org.springframework.security.core.userdetails.User;
//import org.springframework.security.core.userdetails.UserDetails;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.core.userdetails.UsernameNotFoundException;
//import org.springframework.stereotype.Service;
//
//import java.util.List;
//
///**
// * {@code @Author} ChenZY
// * {@code @Date}  2023/9/27 10:34
// * {@code @Description}
// */
//@Service
//@Slf4j
//public class SysUserService implements  UserDetailsService {
//
//
//    @Override
//    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
//        if (!s.equals("admin")) {
//            throw new UsernameNotFoundException("用户名不存在");
//        }
//        List<GrantedAuthority> list = AuthorityUtils.commaSeparatedStringToAuthorityList("User.Role");
//        return new User("admin", "admin", list);
//    }
//}
//
